﻿<%@ Control Language="vb" AutoEventWireup="false" Explicit="true" codefile="Lastest.ascx.vb" Inherits="NVPortal.Modules.NVNews.Lastest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <meta charset="utf-8" />
  <title>Infinite Scroll &middot; jQuery Masonry</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  <link rel="stylesheet" href="/masonry-site/css/style.css" />
  <!-- scripts at bottom of page -->
<body class="demos ">
  
  <section id="content">
    <div id="copy">
</div>

<div id="container" class="transitions-enabled infinite-scroll clearfix">
  <asp:Repeater ID="drgOtherNews" runat="server">
            <ItemTemplate>
                <div class="box col2">
                    <p>
                            <asp:HyperLink id='Label2' runat="server" text='<%# CatName(DataBinder.Eval(Container.DataItem,"categoryid")) %>' ToolTip='<%# CatName(DataBinder.Eval(Container.DataItem,"categoryid")) %>' NavigateUrl='<%# FormatURLCat("danhmuc",DataBinder.Eval(Container.DataItem,"categoryid"),CatName(DataBinder.Eval(Container.DataItem,"categoryid"))) %>' />
                        <br /><br />
                            <asp:Image ID="imgNews" runat="server" ImageUrl ='http://images.dvt.vn/Images/Uploaded/Share/2011/12/20/newyearinscotland.jpg' AlternateText="" />   
                        <br /><br />
                            <asp:HyperLink id='hplOtherNews' runat="server" ToolTip='<%# DataBinder.Eval(Container.DataItem,"Title") %>' NavigateUrl='<%# FormatURL("noidung",DataBinder.Eval(Container.DataItem,"newid"),DataBinder.Eval(Container.DataItem,"Title")) %>' text='<%# DataBinder.Eval(Container.DataItem,"title")%>' />
                        <br /><br />
                            Tác giả: <asp:Label id='HyperLink1' runat="server" text='<%# GetUser(DataBinder.Eval(Container.DataItem,"Userid"))%>' /><br />
                            Thời gian: <asp:Label id='Label1' runat="server" text='<%# Timeago(CInt(DataBinder.Eval(Container.DataItem,"newid"))) %>' />
                        <br /><br /><asp:Label runat="server" Font-Size="20px" Font-Bold="true" text='<%# DataBinder.Eval(Container.DataItem,"newid") %>'></asp:Label></p>
                </div>
            </ItemTemplate>
        </asp:Repeater>

</div> <!-- #container -->

<nav id="page-nav">
  <a href="/masonry-site/demos/Default.aspx"></a>
</nav>

<script src="/masonry-site/js/jquery-1.7.1.min.js"></script>
<script src="/masonry-site/jquery.masonry.min.js"></script>
<script src="/masonry-site/js/jquery.infinitescroll.min.js"></script>
<script>
    $(function () {

        var $container = $('#container');

        $container.imagesLoaded(function () {
            $container.masonry({
                itemSelector: '.box',
                columnWidth: 100
            });
        });

        $container.infinitescroll({
            navSelector: '#page-nav',    // selector for the paged navigation 
            nextSelector: '#page-nav a',  // selector for the NEXT link (to page 2)
            itemSelector: '.box',     // selector for all items you'll retrieve
            loading: {
                finishedMsg: 'No more pages to load.',
                img: 'http://i.imgur.com/6RMhx.gif'
            }
        },
        // trigger Masonry as a callback
      function (newElements) {
          // hide new items while they are loading
          var $newElems = $(newElements).css({ opacity: 0 });
          // ensure that images load before adding to masonry layout
          $newElems.imagesLoaded(function () {
              // show elems now they're ready
              $newElems.animate({ opacity: 1 });
              $container.masonry('appended', $newElems, true);
          });
      }
    );

    });
</script>
  </section> <!-- #content -->

</body>
